package com.rj.bd.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.rj.bd.entity.User;



/**
 * @author FTY
 * @dasc
 * @time 2021-05-31 14:07
 */


@Mapper
public interface UserMapper {
	
	
	
	@Select("select * from user")
	public List<User> queryAll();
	
	@Select(" select * from user limit #{start},#{end}")
	List<Map> getPage(Map maps);

//	登录
	@Select("select * from user where unumber =#{unumber} and upassword=#{upassword}")
	User login(@Param("unumber")String unumber, @Param("upassword")String upassword);

	@Select("select zhuangtai from user where uid=#{uid}")
	public List<User> queryByUid(String uid);


	//注册
	@Insert("insert into user values(#{uid},#{unumber},#{upassword},#{uname},#{usex},#{zhuangtai})")
	void add(User user);


	
}
